<?php
class seoApp extends core
{
	public function alexaAction($arg)
	{
		//print file_get_contents("http://api.liqwei.com/alexa/?domain={$arg['domain']}" );
		$xml = file_get_contents("http://data.alexa.com/data/+wQ411en8000lA?cli=10&dat=snba&ver=7.0&cdt=alx_vw=20&wid=12206&act=00000000000&t=0&ttl=35371&url={$arg['domain']}" );
        print $xml;
	}
	
	public function prAction($arg)
	{
		//print file_get_contents("http://api.liqwei.com/pr/?domain={$arg['domain']}" );
	}
	
	public function recordAction($arg)
	{
		$html = file_get_contents("http://www.baidu.com/s?wd=site%3A{$arg['domain']}" );
		preg_match('/'.iconv('utf-8','gbk','找到相关结果').'(.*?)'.iconv('utf-8','gbk','个').'/is',$html,$num);
		print_r(iconv('gbk','utf-8',array_pop($num)));
	}
}
